home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / COMMUNIC / BULLETIN / 0801B.ZIP / TIME(R).ARC / TIME(R).DOC < prev   
Text File  |  1986-07-06  |  8KB  |  165 lines

  1.         TIME(R) -- Multi-Purpose Time & Timer Facility
  2.  
  3.         Copyright (c) 1986 by
  4.  
  5.         Ryan Katri                        M.I.T. Collie  (7pm-3pm)
  6.         2575 Drake Hill Road              (707) 725-9612
  7.         Fortuna, CA  95540                300/1200/2400
  8.                                           Net/Node  800/9
  9.         All rights reserved.
  10.  
  11.         Released for non-commercial,  no-profit,  private use only.  If you 
  12.         make  any  money  using  this  product or use it in your business I 
  13.         expect fair compensation to be mailed to the address above.  
  14.  
  15.  
  16.         DESCRIPTION
  17.         -----------
  18.  
  19.         TIME(R) is a program that is mainly for  use  in  batch  files.  It
  20.         provides three functions: Pause, Wait Until, and Loop.  Using these
  21.         three,  you  can  pause  your batch file for any number of seconds,
  22.         wait to continue execution until a certain time of day, or loop for
  23.         a specified number of seconds to see if an operator is standing  by
  24.         to press a key before continuing.
  25.  
  26.         TIME(R)  can  drop  an errorlevel to your batch file when using the
  27.         Loop or Wait Until options.  Thus,  your batch file can decide what
  28.         operation  to  perform depending on the errorlevel it receives from 
  29.         TIME(R).  
  30.  
  31.  
  32.         USES
  33.         ----
  34.  
  35.         I first wrote TIME(R) for myself to solve a couple problems  I  was 
  36.         having.  
  37.  
  38.         For one, I had a batch file that sent commands to my modem, only it 
  39.         sent  them  too fast (the modem couldn't keep up).  I use the Pause 
  40.         option of TIME(R) to pause for 1 second between each command.  
  41.         
  42.         The Pause option is also great  for  your  BBS  system  if  it  has 
  43.         external schedules (like Collie).  With Collie you can only set a 1 
  44.         minute schedule minimum.  This can pose a problem if your task only 
  45.         lasts  for  20  seconds;  when  the  task is done it will return to 
  46.         Collie which will notice the schedule is not over with and run your 
  47.         task again!  Use the Pause option along with your task to wait  the 
  48.         remaining seconds until the schedule time is exhausted.  
  49.  
  50.         --------------------
  51.         
  52.         I  also  use  TIME(R)  in  my  Autoexec.Bat file.  What happens is, 
  53.         whenever the computer is reset (for whatever reason),  it  ends  up 
  54.         running  TIME(R)  using  the  Loop  option.  The  Loop waits for 20 
  55.         seconds for me to press <Space>.  If I don't,  it exits to my batch 
  56.         file  with  an  errorlevel  set.  My  autoexec  file tests for this 
  57.         errorlevel and then runs Colossus (my BBS) if the <Space>  was  not 
  58.         hit.  In  my  configuration  I  have  TIME(R)  drop  with  the same 
  59.         errorlevel whether I 
  60.                  
  61.         I also use TIME(R) to run my BBS if there was a  power  outage  and 
  62.         then it comes back on.  What happens is this: 
  63.         
  64.            1)  My  autoexec file runs TIME(R) using the Loop option,  which 
  65.                waits for 15 seconds before dropping  back  into  the  batch 
  66.                file.  
  67.  
  68.            2)  If  no  key  is pressed within the 15 seconds,  then TIME(R) 
  69.                exits with an errorlevel of 10.  My autoexec file tests  for 
  70.                this errorlevel and runs the BBS appropriately.  
  71.  
  72.            3)  If  <Return> os pressed it will also drop with an errorlevel 
  73.                of 10, and therefore run the BBS.  
  74.  
  75.            3)  If <Space> is pressed then TIME(R) exits with  an errorlevel 
  76.                of 0 set.  My autoexec file only tests for errorlevel 10, so 
  77.                the  BBS  will  NOT  be run,  but instead my memory resident 
  78.                utilities are loaded and I am given Dos control.  
  79.  
  80.         There are several advantages to using this  simple  method;  first, 
  81.         your BBS will always be run when the computer is turned on (such as 
  82.         when the electricity comes back on) whether you are there or not.  
  83.  
  84.         Secondly,  if  you  use several memory-resident utilities like I do 
  85.         (CED, KBFIX, etc),  then all you have to do to run your BBS without 
  86.         these  things  is press your reset keys.  The memory-resident stuff 
  87.         will be unloaded since they are probably not compatible  with  most 
  88.         bulletin  board systems (Collie,  Fido,  and others).  On the other 
  89.         hand,  if you do a reset and DON'T want to run the BBS,  just press 
  90.         <Space> and your utilities will be loaded and you'll have Dos.  
  91.         
  92.         Finally, it makes it easy for a mere user of your system (wife, 
  93.         brother,  friend)  to  use  your  computer  without  having to know 
  94.         anything about setting up the BBS.  When they are  done  with  what 
  95.         they  are  doing  they can just press the reset keys (usually CTRL-
  96.         ALT-DEL) and your autoexec batch file can take care  of  everything 
  97.         else!  
  98.  
  99.         --------------------
  100.  
  101.         The last option of TIME(R) I don't use too often.  This is the Wait 
  102.         Until  option.  But  it  can  be  very useful feature if you have a 
  103.         program that NEEDS to be run at a certain time.  Use Wait Until  to 
  104.         wait until that time (like 11:03,  or ANYTIME!) before running your 
  105.         program.  
  106.  
  107.         
  108.         HOW TO USE
  109.         ----------
  110.  
  111.         TIME(R) is invoked by the command
  112.  
  113.              TIMER {options} [time] ...
  114.  
  115.         Three of the options require a time (either in seconds or a time of 
  116.         day) to be given.  
  117.  
  118.         The following options are:
  119.  
  120.         Option         Time      Abbrev  Function
  121.         -------------- --------- ------- ------------------------------
  122.         CONFIG                   C       Configure TIME(R)
  123.         HELP                     H or ?  Help and summary of commands
  124.         LOOP           Seconds   L       Loop for specified number of
  125.                                          seconds or until key pressed
  126.         PAUSE          Seconds   P       Pause for specified number of
  127.                                          seconds.
  128.         WAIT           Time of   W       Wait Until a certain time to
  129.                          Day             continue.
  130.  
  131.         Descriptions.
  132.  
  133.         CONFIG  --  The  configuration is  not necessary,  but  allows 
  134.                     customization  for  your  specific needs.  Most of 
  135.                     the questions are self-explanatory.  
  136.  
  137.         HELP    --  Gives a quick summary of TIME(R)'s functions.  
  138.  
  139.         LOOP    --  Sends  TIME(R)  into a timed  loop,  which  can be
  140.                     aborted  with  a keypress.  TIME(R) will exit with 
  141.                     an errorlevel set depending on whether it finished 
  142.                     the timed loop or if a  <Return>  or  <Space>  was 
  143.                     pressed  (these  errorlevels  can  be  set  in the 
  144.                     configuration).  
  145.  
  146.         PAUSE  --  This is basically  the same as LOOP,  only it won't
  147.                    drop with an errorlevel.  The pause can be  aborted 
  148.                    with a press of any key.  
  149.  
  150.         WAIT   --  This option will cause LOOP to wait until a certain
  151.                    time  before  exiting  (probably  into  your  batch 
  152.                    file).  This also can be aborted with  <Return>  or 
  153.                    <Space>,  which  will also exit with the errorlevel 
  154.                    set in the configuration.  
  155.  
  156.                    NOTE:  If the time to wait until is something  like 
  157.                           9:00,  make  sure  to include a leading zero 
  158.                           before the 9,  so it looks like this:  09:00 
  159.                           If this is not done, TIME(R) will abort with 
  160.                           an Invalid Time error.  
  161.  
  162.  
  163.  
  164. 
  165.